<%@page import="member.MemberVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>view.jsp</title>

<script>
function getId(id){ return document.getElementById(id);}

function init(){
	getId("btnList").onclick = function(){
		location.href="index2.jsp?inc_center=./jsp/list.jsp";
	}
	
	getId("btnModify").onclick = function(){
		var mid = getId('mid').value;
		location.href="index2.jsp?inc_center=./jsp/modify.jsp&mid=" + mid;
	}
	getId("btnDelete").onclick = function(){
		var mid = getId('mid').value;
		location.href="index2.jsp?inc_center=./jsp/delete.jsp&mid=" + mid;
	}
}

function check(){
	 var check = confirm("정말 삭제하시겠습니까?");
 	  
 	  if(check){
 		  alert("삭제합니다");
 		  location.href="index2.jsp?inc_center=./jsp/delete.jsp";
 	  }
 	  else {
 		  alert("취소합니다.");
 	  }
}
</script>
</head>
<body>
<jsp:useBean id="bean" class="member.Login" scope="page" />
<jsp:setProperty property="*" name="bean"/>
<%
MemberVo m = bean.view();
if(m == null){
	out.print("관련정보가 엇습니다. 다시 회원조회를 해주세요");	
}
%>
<h1>회원 상세정보</h1>
<ul id="view_List">
	<li>아이디 : <output id="mid"><%=m.getMemberid() %></output>
	<li>비&emsp;번 : <%=m.getPwd() %>
</ul>

<input type="button" value="목록" id="btnList">
<input type="button" value="수정" id="btnModify">
<input type="button" value="삭제" id="btnDelete">

<script>
init();
</script>
</body>
</html>